home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1599 / 1432 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  964 b 

  1. From: bousch@topo.matups.fr (Thierry Bousch)
  2. Subject: Re: Opening files so that no cr/lf translation is done.
  3. Date: Sun, 22 May 1994 17:49:24 +0200 (MET DST)
  4. In-Reply-To: <199405171234.WAA11826@seldon.apanix.apana.org.au> from "Michael Smith" at May 17, 94 10:04:56 pm
  5.  
  6. Hello Michael,
  7.  
  8. > This had me stumped for some time - particularly because the 'od' in
  9. > the shu194st.zoo archive on atari.archive has the same problem : so I
  10. > have two files, of different size, that 'od' to the same file.
  11.  
  12. The default behaviour of the MiNT library is to open files in `text'
  13. mode. This is definitely not what you want for `od', but this is
  14. reasonable for the other textutils. A quick fix is to set the UNIXMODE
  15. environment variable (at least locally).
  16.  
  17. Another simple solution, if you have the source and are willing to
  18. recompile it, is to add the following line
  19.  
  20.     int __default_mode__ = _IOBIN;
  21.  
  22. to one of the source files. (I think _IOBIN is defined in stdio.h).
  23.  
  24. Thierry.
  25.